package mobile;

import beta.Form;
import beta.Item;
import beta.LabelItem;
import beta.Screen;
import beta.ScreenManager;
import beta.SwitchListItem;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;

public class Main extends MIDlet implements CommandListener
{
    private Form form;
    
    public Main()
    {
        ScreenManager.init(this);
        String[] tab = { "Pozycja 1", "Pozycja 2", "Pozycja 3", "Pozycja 4" };
        form = new Form("Formularz");
        form.add(new LabelItem("test 1.1\ntest 1.2\ntest 1.3"));
        form.add(new LabelItem("test 2", Item.ALIGN_CENTER));
        form.add(new LabelItem("test 3.1\ntest 3.2\ntest 3.3", Item.ALIGN_CENTER));
        form.add(new LabelItem("test 4", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 5"));
        form.add(new LabelItem("test 6"));
        form.add(new LabelItem("test 7"));
        form.add(new SwitchListItem("Etykieta pola\nSwitchListItem", tab));
        form.add(new LabelItem("test 8.1\ntest 8.2", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 9"));
        form.add(new LabelItem("test 10"));
        form.add(new LabelItem("test 11", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 12"));
        form.add(new LabelItem("test 13", Item.ALIGN_CENTER));
        form.add(new LabelItem("test 14.1\ntest 14.2\ntest 14.3"));
        form.add(new LabelItem("test 15", Item.ALIGN_CENTER));
        form.add(new LabelItem("test 16.1\ntest 16.2\ntest 16.3", Item.ALIGN_CENTER));
        form.add(new LabelItem("test 17", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 18"));
        form.add(new LabelItem("test 19"));
        form.add(new SwitchListItem("hehehehehehehe", tab));
        form.add(new LabelItem("test 20"));
        form.add(new LabelItem("test 21.1\ntest 21.2", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 22"));
        form.add(new LabelItem("test 23"));
        form.add(new LabelItem("test 24", Item.ALIGN_RIGHT));
        form.add(new LabelItem("test 25"));
        form.add(new LabelItem("test 26", Item.ALIGN_CENTER));
        ScreenManager.setCurrentScreen(form);
    }
    
    public void startApp() 
    {
        ScreenManager.takeOver();
    }

    public void pauseApp() 
    {
        
    }

    public void destroyApp(boolean unconditional) 
    {
        
    }

    public void commandAction(Command cmd, Displayable arg1)
    {
        // --
    }
}
